package draw

import (
	"vrcm/src/vrcm/common/dto"
	"vrcm/src/vrcm/common/models"
)

type DrawBasicGetPageReq struct {
	dto.Pagination `search:"-"`
	TenantId       string `json:"tenant_id"  search:"type:exact;column:tenant_id;table:draw_basic"`
	BindId         string `json:"bind_id"  search:"-"`
	Round          int    `json:"round"  search:"-"`
}

func (m *DrawBasicGetPageReq) GetNeedSearch() interface{} {
	return *m
}

type DrawSaveReq struct {
	models.Model
	TenantId  string `json:"tenant_id" comment:"租户"`
	BindId    string `json:"bind_id" comment:"绑定业务id"`
	Animation string `json:"animation" comment:"动画"`
	DrawTitle string `json:"draw_title" comment:"抽奖标题"`
	IsRepeat  int    `json:"is_repeat" comment:"是否重复抽奖 1是 2 否"`
	Round     int    `json:"round" comment:"场次"`
	JoinType  int    `json:"join_type" comment:"1 全员 2 白名单"`
	IsSwitch  int    `json:"is_switch" comment:"1 是 2 否"`
	models.ControlBy
}

type GetDrawReq struct {
	Id int `json:"id" comment:"id"`
	models.ControlBy
}

type GetDrawingReq struct {
	BindId string `json:"bind_id" comment:"绑定业务id"`
	Round  int    `json:"round" comment:"场次"`
	models.ControlBy
}

type GetAwardInfoReq struct {
	DrawId int `json:"draw_id" comment:"id"`
	//Round  string `json:"round" comment:"场次"`
	models.ControlBy
}

type SaveAwardInfoReq struct {
	AwardRecordId int    `json:"award_record_id" comment:"award_record_id"`
	UserName      string `json:"user_name" comment:"抽奖用户"`
	MobilePhone   string `json:"mobile_phone" comment:"手机号"`
	Address       string `json:"address" comment:"手机地址"`
	PrizeType     int    `json:"prize_type" comment:"领奖方式 1 寄送2 私信 3无需"`
	models.ControlBy
}

type StartDrawReq struct {
	Id        int `json:"id" comment:"id"`
	SceneType int `json:"scene_type" comment:"场景类型1 直播间"`
	models.ControlBy
}

type EndDrawReq struct {
	Id        int `json:"id" comment:"id"`
	Round     int `json:"round" comment:"场次"`
	SceneType int `json:"scene_type" comment:"场景类型1 直播间"`
	models.ControlBy
}

type DrawCopyReq struct {
	Id int `json:"id" comment:"id"`
	models.ControlBy
}

type DrawDeleteReq struct {
	Id int `json:"id" comment:"id"`
	models.ControlBy
}

type ClaimPrizeSaveReq struct {
	models.Model
	TenantId  string `json:"tenant_id" comment:"租户"`
	DrawId    int    `json:"draw_id" comment:"抽奖配置id"`
	PrizeType int    `json:"prize_type" comment:"领奖方式 1寄送奖品 2私信兑换 3 无需领奖"`
	models.ControlBy
}

type PrizeConfigSaveReq struct {
	models.Model
	TenantId  string `json:"tenant_id" comment:"租户"`
	DrawId    int    `json:"draw_id" comment:"抽奖配置id"`
	PrizeName string `json:"prize_name" comment:"奖品名"`
	PrizeImg  string `json:"prize_img" comment:"奖品图片"`
	PrizeNum  int    `json:"prize_num" comment:"奖品数量"`
	models.ControlBy
}

type PrizeConfigCopyReq struct {
	Id int `json:"id" comment:"id"`
	models.ControlBy
}

type PrizeConfigDeleteReq struct {
	Id int `json:"id" comment:"id"`
	models.ControlBy
}

type ClickDrawReq struct {
	DrawId      int    `json:"draw_id" comment:"抽奖配置id"`
	TenantId    string `json:"tenant_id" comment:"租户"`
	UserName    string `json:"user_name" comment:"抽奖用户"`
	MobilePhone string `json:"mobile_phone" comment:"手机号"`
	Address     string `json:"address" comment:"手机地址"`
	Round       int    `json:"round" comment:"场次"`
	models.ControlBy
}

type GetUserAwardInfoReq struct {
	BindId   string `json:"bind_id" comment:"bind_id"`
	Round    int    `json:"round" comment:"场次"`
	UserName string `json:"user_name" comment:"用户信息"`
	models.ControlBy
}

type AddDrawWhiteReq struct {
	DrawId     int         `json:"draw_id" comment:"抽奖配置id"`
	JoinType   int         `json:"join_type" comment:"参与类型 1全体参与者 2白名单"`
	TenantId   string      `json:"tenant_id" comment:"租户"`
	DrawWhites []DrawWhite `json:"draw_whites" comment:"抽奖白名单"`
}

type DrawWhite struct {
	DrawId       int    `json:"draw_id" comment:"抽奖配置id"`
	TenantId     string `json:"tenant_id" comment:"租户"`
	PrizeId      int    `json:"prize_id" comment:"奖品id"`
	JoinType     int    `json:"join_type" comment:"参与类型 1全体参与者 2白名单"`
	IsSelect     int    `json:"is_select" comment:"是否必中 1是 2否"`
	PhoneOrEmail string `json:"phone_or_email" comment:"手机号或邮箱"`
	models.ControlBy
}

type SaveDrawWhiteReq struct {
	Id           int    `json:"id" comment:"id"`
	DrawId       int    `json:"draw_id" comment:"抽奖配置id"`
	TenantId     string `json:"tenant_id" comment:"租户"`
	PrizeId      int    `json:"prize_id" comment:"奖品id"`
	JoinType     int    `json:"join_type" comment:"参与类型 1全体参与者 2白名单"`
	IsSelect     int    `json:"is_select" comment:"是否必中 1是 2否"`
	PhoneOrEmail string `json:"phone_or_email" comment:"手机号或又想"`
	models.ControlBy
}

type DeleteDrawWhiteReq struct {
	Ids []int `json:"ids" comment:"ids"`
}

type GetDrawWhiteReq struct {
	Id int `json:"id" comment:"id"`
}

type SavePrizePageReq struct {
	DrawId    int    `json:"draw_id" comment:"抽奖配置id"`
	SecretNum string `json:"secret_num" comment:"私信号码"`
	QRCode    string `json:"qr_code" comment:"二维码"`
	Tip       string `json:"tip" comment:"提示"`
	models.ControlBy
}
